package service.Impl;

import dao.StationDao;
import entity.StationEntity;
import service.StationService;

import javax.xml.bind.SchemaOutputResolver;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/11/9.
 */
public class StationServiceImpl implements StationService {
    private StationDao sd=new StationDao();
    @Override
    public Map<String,Object> queryAll(String startStation, String endStation, String stationNum) {

        try {
           return sd.querySitePrice(startStation,endStation,stationNum);
        } catch (SQLException e) {
            e.printStackTrace();
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        }finally{
            try {
                sd.close();
            } catch (SQLException e) {
                e.printStackTrace();
            }
        }
        return null;
    }
}
